<?php  
//  	include("conn.php");
//测试成功
$hostname_conn = "localhost";
$database_conn = "xdq";
$username_conn = "root";//没改的话一般时root
$password_conn = "123456";
  	$lessonid= $_POST['id'];
$conn = mysqli_connect($hostname_conn, $username_conn, $password_conn,$database_conn)or trigger_error(mysqli_error(),E_USER_ERROR);


    $sql = "select * from lessonKey where lessonid= '$lessonid' order by time desc limit 1";  
    $result = mysqli_query($conn, $sql);
	if (mysqli_num_rows($result) > 0) {
		while($row = mysqli_fetch_assoc($result)) {
			echo json_encode($row,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);//将请求结果转换为json格式
			}
		}

?>  